package com.woniu.darryringmall.front.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户表实体类
 */
@Data
public class User {
    private int id;
    private String name;//真实姓名
    private String nickname;//昵称
    @NotBlank(message = "密码不能为空")
    @Size(min = 6,max = 16,message = "密码产长度应在{min}-{max}之间")
    private String password;//密码
    private String sex;//性别
    private String birthday;//出生日期
    @Email(message = "邮箱格式不正确")
    private String email;//邮箱
    private String avator;//头像
    @NotBlank(message = "电话号码不能为空")
    private String telephone;//电话号码
//    @TableField(fill = FieldFill.INSERT)
    private String regTime;//注册时间
    private String status;//状态
    private String idCard;//身份证
    @TableField(exist = false)
    private String code;
}
